---
title: "SQL-003: Retrieve administrative law judge (ALJ) list"
summary: Retrieve legal persons classified as ALJ, board member, or federal judge for attorney-assignment maintenance.
status: draft
owner: SAIF Documentation Pipeline
last_reviewed: 2026-08-21
library: SAIF.Application.Claim.Legal
reference_type: embedded
---

# SQL-003 Retrieve administrative law judge (ALJ) list

Retrieves `LEGAL_PERSON` rows whose `LEGAL_PERSON_TYPE` is `ALJ`, `BOARD`, or `FJ` (administrative law judge, board member, or federal judge), for the `ALJLISTSQL` code-table lookup used by the attorney-assignment maintenance UI.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-003 |
| **Operation type** | Read |
| **Execution method** | Inline SQL (`clsCodeCollection.GetCodeCollection`) |
| **Database** | Oracle |
| **Command type** | Text |
| **Business object** | N/A (Application layer) |
| **Criteria property** | N/A (Application layer) |
| **Lifecycle method** | N/A (Application layer) |
| **Application class** | `clsAttorneyTableManager` |

## Parameters

No runtime parameters — this is a static code-table lookup constant (`ALJLISTSQL`), executed as-is via `clsCodeCollection.GetCodeCollection(DPI, ALJLISTSQL)`.

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [LEGAL_PERSON](../database-tables.md#legal_person) | SELECT, JOIN | `LEGAL_PERSON_SEQ_NUM`, `LAST_NAME`, `FIRST_NAME`, `PREFERRED_NAME` |
| [LEGAL_PERSON_TYPE](../database-tables.md#legal_person_type) | SELECT, JOIN | `LEGAL_PERSON_SEQ_NUM`, `LEGAL_PERSON_TYPE_CODE` |

## Sample SQL

```sql
SELECT
  to_char(per.legal_person_seq_num) As code,
  LAST_NAME || ', ' || decode(nvl(preferred_name, ' '), ' ', FIRST_NAME, preferred_name) AS code_descr
FROM legal_person per,
  legal_person_type typ
WHERE typ.legal_person_seq_num = per.legal_person_seq_num
  AND typ.legal_person_type_code IN ('ALJ', 'BOARD', 'FJ')
```

## Sources
- `SAIF.Application.Claim.Legal\clsAttorneyTableManager.vb`
